<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>定制价格（{$sp.name}）</h2>
    </div>
    <form action="{:U(Shop/price)}" method="post" class="form-horizontal">
        <div class="form-item ty">
                <label class="item-label">
                    统一输入价格
                </label>
                <div class="controls ">
                   
                    <input type="text" class="text input-large " id="mprice" value="" placeholder="市场价格" >
                </div>
                <div class="controls">
                    <input type="text" class="text input-large " id="sprice" value="" placeholder="商城价格" >
                </div>
                <div class="controls">
                    <input type="text" class="text input-large " id="num" value="" placeholder="库存量" >
                </div>
            </div>
            <div class="bl">
            <volist name ="_list" id='vo'>
            <div class="form-item">
                <label class="item-label">
                 <volist name ="vo" id='v'>
                     {$v} &nbsp;&nbsp;&nbsp;
                  </volist>            
                  </label>
                <div class="controls">
                    <input type="text" class="text input-large mprice" name="mprice[]" value="" placeholder="市场价格">

                </div>
                <div class="controls">
                    <input type="text" class="text input-large sprice" name="sprice[]" value="" placeholder="商城价格">
                </div>
                <div class="controls">
                    <input type="text" class="text input-large num" name="num[]" value="" placeholder="库存量">
                </div>
            </div>
            </volist>
            </div>
            <volist name='attrvid' id='v'>
            <input type="hidden" name="attrvid[]" value="{$v}">
            <input type="hidden" name="gid[]" value="{$id}">
            </volist>
        <div class="form-item">
            <button class="btn submit-btn " id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Attr/index')}');
        $(function(){

            $('.ty #mprice').keyup(function(){
              var a = $('.ty #mprice').val();
              $('.bl .mprice').val(a);
            });
            $('.ty #sprice').keyup(function(){
              var a = $('.ty #sprice').val();
              $('.bl .sprice').val(a);
            });
            $('.ty #num').keyup(function(){
              var a = $('.ty #num').val();
              $('.bl .num').val(a);
            });

        });
    </script>
</block>
